<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>
<%@page import="model.Product"%>
<html>
<head>
	<title>Product Lijst</title>
    	<link href="<s:url value='/css/main.css'/>" rel="stylesheet" type="text/css"/>
    <title><s:text name="label.products"/></title>
</head>
<body>
	<h3>Product overzicht</h3>
	<table  class="borderAll">
		<tr>			
			<td><s:text name="label.product.id"/></td>
			<td><s:text name="label.product.description"/></td>
			<td><s:text name="label.product.type"/></td>
			<td><s:text name="label.product.active"/></td>
			<td>actie</td>
		</tr>
		
	<s:iterator value="producten" status = "status">

	<tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
		<td class="nowrap"><s:property value = "productId"/></td>
		<td class="nowrap"><s:property value = "description"/></td>
		<td class="nowrap"><s:property value = "productType"/></td>
		<td class="nowrap"><s:property value = "active"/></td>	
		<td class="nowrap">
		<s:form action="Productcrud!input" >
      		<s:hidden name="editId" value="%{productId}"/>
      		<s:submit value = "edit"/>
        </s:form>
     </td>
</tr>
</s:iterator>
</table>
	<s:form action="Productcrud!input">
	<s:hidden name="editId" value="0"/>
		<s:submit value="Nieuw Product" />
	</s:form>
<p>
	<s:url action="ProductPDF!makepdf" id="url"></s:url>
    <a href="<s:property value="#url"/>">Maak PDF Product Overzicht</a>
 </p>
<p><a href="index.jsp" >Terug naar startpagina</a>.</p>
</body>
</html>